<?php
use yii\helpers\Html;
use backend\assets\AppAsset;
use yii\bootstrap\ActiveForm;
use yii\captcha\Captcha;
use yii\web\View;
$this->title = '管理员登录页面';
AppAsset::register($this);
AppAsset::addCss($this,Yii::$app->request->baseUrl."/status/css/public.css");
$jsString= "$(function(){
    $('.seek_pass').click(function(){
        location.href = '/public/seekpassword';
    });
});";
$this->registerjs($jsString, View::POS_END);
?>
<?php $this->beginPage() ?>
<!doctype html>
<html lang="en">
<head>
    <?= Html::csrfMetaTags() ?>
    <meta charset="UTF-8">
    <title><?= $this->title;?></title>
    <?= $this->head();?>
</head>
<?php $this->beginBody() ?>
<body>
<div id="content">
    <div class="login_logo"><img src="<?= \yii\helpers\Url::to('@web/status/image/bg/cc.png')?>" alt=""></div>
    <div class="login">
        <?php $from = ActiveForm::begin([
            'id' => 'login-form',
            'options' => ['class' => null],
            'fieldConfig' => [
                'template' => '{input}{error}'
            ],
        ]); ?>
        <div class="b_body">
            <?= $from->field($model, 'username', [
                'options' => ['class' => 'in_txt'],
            ])->textInput(['placeholder' => '管理员账号'])->label('管理员账号') ?>

            <?= $from->field($model, 'password', [
                'options' => ['class' => 'in_txt']
            ])->passwordInput(['placeholder' => '管理员密码'])->label('管理员密码') ?>

            <?= $from->field($model, 'verifyCode')->widget(Captcha::className(),[
                'captchaAction' => 'public/captcha',
                'imageOptions' => ['alt'=>'点击换图','title'=>'点击换图', 'style'=>'cursor:pointer'],
                'template' => '<div class="verify_code">{input}<div class="input_img" style="padding:0;">{image}</div></div>',
                'options' => ['class' => 'check_txt', 'placeholder' => '验证码']
            ])->label('验证码'); ?>

            <?= $from->field($model, 'remember')->checkbox([
                    'template' => "<div class='checker_txt'><span class='checked'>{input}</span>Remember me <span class='seek_pass'><a href='javascript:;' class='seek_pass'>找回密码</a></span></div>"
            ])?>

            <div class="checker_txt">
                <div class="btn_txt">
                    <?= Html::submitButton('登录', ['class' => 'login_btn', 'name' => 'login-button'])?>
                </div>
            </div>
        </div>
        <?php ActiveForm::end(); ?>
        <div class="end">Cicimap @ by 2016</div>
    </div>
</div>
</body>
<?php $this->endBody() ?>
</html>
<?php $this->endPage() ?>